refactored placeholder creation and fixed mistake for string parse function