finished opt.ml and added some test cases