added thread support, since the getline function is completely blocking
the main thread and the entities cant move while we wait for input