I think I fixed plot functionality