Applying methods of one object on another