style and error checking