Added support for querying start and end x value