fixed debug line numbers & added comments