updated to 1 pass