adoptation to Miranda NG

not tested