use optparse if python version < 3.2