adapted sysout
added jar building to pom.xml
added two major bugs and added tests for them.