remove unnecessary arraylist and update javadoc