Refactor, removing test import error, #51 find_by_patterns function