first working version
sentence end semantics added
refactoring