added debug and clarification text to main.cpp