added some modification to pom.xml and the code