Updated pom.xml and Code implementation to fit the version