Combine range into one function.