minor edit to a function