added commenting in several places