switch to optparse