updated the code by migrating to sbt