update point function.