managed to fix errors