handle array errors
build