adding documentation to functions