add infi and fix extern