changing the interface and adding javadoc