select option logic with tag hash