adaptated for maven