trying to deal with errors