made it possible to handle multiple objects