Simple function to extend objects