first working plot version