converting old code for maven