done up to bool.ml (except for choose)