refactor with tag