remove debug
add explanatory comments