seems to work, but messages method is slow