added check to make sure record found before updating