Attempting to create computationally efficient First function