Add subscribe() function
Add docstring for subscribe() function