add if condition to remove method