updated parse string to support custom elements