changes in the remove method. Is not working properly