put error messages in, and edited style