Early bony fishes (~420 mya) had two pair of nostrils, one pair for incoming water (known as the anterior or incurrent nostrils), and a second pair for outgoing water (the posterior or excurrent nostrils), with the olfactory apparatus (for sense of smell) in between. In the first tetrapodomorphs (~415 mya) the excurrent nostrils migrated to the edge of the mouth, occupying a position between the maxillary and premaxillary bones, directly below the lateral rostral (a bone that vanished in early tetrapods).