add views and error handling