add remove command and fix bug