adding insertGetId functionality