removed for loop from gallery