Make it threadsafe, maybe