refactor get and _get_by_unique