refactoring
prevent parsing of empty strings