placed engine in a thread
improved it