Support of multiple objects in extend() method