need to fix function removing