In order to improve testability added a method that is able to parse strings