added comments and jdoc