abstracting a format string