alternating functions