[PatriotAct] vastly simplified code