updated gui, added comments for javadoc