added type1error functions