reformat simple function
refactor docs functions