implement receive using one handler