extracted error messsages to variables