added 'extend' method to ObjectCollection class