updated to use Spark 0.9.1-rc3
added kj calculations