added JavaDoc comments.