divide into activity and service parts