Implement lastN differently.