Could you add jsdoc for this function?