Updated Assign method to support methods aswell