API updates: support chnages in shock, add sort for m5nr, fixed issuses with matrix