graphics plotting again
at last refactored
refactored