added space for reverse gate functions