refactor to support for maven