split plotting to separate method