implemented position updating