more comments, still need improvement in comments and scaladocs