updates linked list vs array