Adding a method for updating the adapter