moved service code to another activity