successfully put all subscription code in the subscription method