sorta working. down to logic errors *sigh*