ported to maven and java 1.6