sketch out functions, get plotting working