fixed runtime error; javadoc more or less complete