moved old print format code to a separte file