added checking for errors in a cell