further simplifications to handleMessage