part 1 of 2 error cleanup