Added return values for insert/update functions