edited and added comments