fixed selectedBy functions and working info button for each image