Implemented terminate first pass