gets messages