add support to store and compare message counter