adding spark_memory and spark_wave, conditionally loading if spark is installed