stack formatting and printing split