use thorbenk/marray (speed improvements)