tidied up snprintfs