updated some comments and some documentation