added comments in classes to ease understanding of methods