string.format was at wrong place