extract methods from an object