Minor refatoring for find_by()