refactor remove command