Added range callback function