delete gap; change type error back to value error