first plot implementation