Added ability to set xlimit