implement subscription functionality in the frontend