custom array functions replaced with built-in ones from ecma5