roughly sudo-coded data router

i will fix this around 9 pm 12/11/14