Can you please add some JSDoc comments to this function?