started to rewrite program