code cleanup - added function printfooter()