remove method if defined