conditional in position updating to make queries less expensive.