if -> when in receive
Closes #1 (also, #2 w/o tests)