Improve finding function