added comments in functions of library