add support for complex strings & refactoring