with message passing