added accessors; fixed #5
added JavaDoc; fixed #4