added doc strings to functions