final fixes of basic program