Maybe we could make the code less ugly by using ```sprintf``` (http://ideone.com/wxS5Km) ?