adding method as a object