cope with errors implemented