added copyright and javadocs