minor
adding function documentation and formatting