made hasErrors private