fix rev while still avoiding sql injection, i think