solved the big bug and some debug info