implemented returning of path back into main thread