Updated functions to return (hopefully) proper plot. please tell me if they work
Updated Script (proper plots)