started on improving main.ml