sprintf updated, was not working