Change find/first/last to function and wrapper