add comments explaining some of member functions