basic structure and errors in place