lots of janky hacks; shit needs to be cleaned up