can loop a function in object