work further on implementing, add javadocs