shitty code, hoping to fix