added method to set all the needed values to update