renamed printf to sprintf