added support for multiple objects