updated syntax and errors treated