setLoading function

Return a copy of the table with an additional loading added