added handling of validation exceltions