added function plot