Added Update_array function and tested