Implementing FIRSTs function.