string is parsed into individual elements
refactoring into class structure