added scaladoc.