modified miniprintf