using sprintf, but not working