suggest error handling and conditional improvement