attempt 2 and removing iteration