updating service and main activity