split plotting functions
refactored driver
refactored driver