Updated resting contact code