port orifice detection code in