small change and print with constant extra mem attempt