trying to factor out errors interface