Add range function.