added most of gateway part -the jump abbility