added SentencePosition algorithm