added option index validation and single type selection