Using StringBuilder to build output