combined error functions