defined update function for company model