sprintf mostly written