added formatting and single window app