getting message out of db