moved code for worrking with typed arrays to m.defs.js