added messages code