more code added to main thread loop