advanced string formatting