using pub sub to receive clear command