text message working but needs to refactor