added missing check for between