CR changes: renamed the function