implementing bugfixes