refactor using sbt for building jar