Add function for range support