updated coments and some var names