made a bunch of hacks to make things work