Please move the x++ where it belongs to :)