converted everything from OnSubscribeFunc to OnSubscribe