refactor, add debug messages