Documentation added

Added a better documentation for the functions