add javadoc
remove duplicated implementations