Implemented remove function