refactored to be used with 1,2,3,more objects