updated to allow setting x/y ranges independently