added comments and notes and some methods