add localized function
add comments