error handling added for update methods