bugfixing and initializer method