updated logic to new option tag