fixes issue #37, random not including most recent submission. Also includes prep work for discipline filtering