getting short opts string

it's pretty crazy
also probably leaks memory