made inputprovider threadsafe, I hope