Slight tweak to last update, so as to allow a range of xmins to be given by the user.