added better jump detection