added implementation for plot 1