Added docs to functions