writing format string expansion code