added in-line function documentation