adding jsdocs function based on my docit fork