Changing output formatting; adding stack counter