implementing a first-in