add complete function documentation, adhere to style checker rules.