bugfixes, rm function added