define plot and eval function