This function needs JSDoc.