lookup message logic