range function complete