My first code using PyOpt