corrected find function.