messages
db functions