fix limit bug
Added support for from and to options