remove function working