it's ugly and crappy, but I don't see any other way of making this perfect