bugfixing stage 1