Should have JSDoc for this function.