removed a couple of lines of ruby used in APES debugging shouldn't be necessary here