fix the find function