Extracted Spark creation to a Method