Added function formatString