add doc block comments
code clean up