renamed methods, added comments