Started function to define syndrome from errors