added data validation and database update test