Added auto-range support