Add a function for subscribe