Added doc to functions