adding gate r-x