changes to compile with spark 1.0.2