additional error handling and command logic