bugfixing and adding deletes