warnings removed, javadoc added