added thread to try to do some tasks in the background