Also return value from range function