Changed find functions to be more generic