changed to make sure it runs in background