move service code out of the main thread
move service code out of the main thread