command line option parsing

there's gotta be a better way to do this, but it's working pretty well