better error handling and fixed .cute