removed empty lines & added docstring