new algorithm for rope jumping