code style and error messages