removed insertAt helper function from array prototype