attempt at RIFEQ implementation