added type safety to implement expected message list