updated logic so that client side JS models stay in sync with add/delete of texts