implemented printf