added javadoc and shit