update function is now modal and ajaxy