completely rewrote backend for decreased horror; not passing tests due to generator problem (likely to do with shuffle)