added threading
I dunno lol