forgot x-- so added post decrement