added return for setObject method