mainly changing printf to print and format specifies to plan9 style