Added Documentation and three functions