prior routines and first plot