added dynamic selects box functionality