refactor to avoid creating _id value when not present in url