hm
this code works it might have just gotten ugly :(