member functions, bit of bugfixing