WCan anyone help with text message algorithm