Simplyfied the jumping code