working plot that does not halt loop