use initialized-if where possible
more error handling
more error handling