work on messages and ids