updated initialized array and localStorage