changed the api functionaliy for subscribing and unsubscribing