simple spark code (non-optunity still)