fixing bugs, removing debug output...