fixed some stuff, tests fail :(