fixed bugs, added dependencies to pom.xml