debugged a bit more