added singleton on service class for shared state.