Updates 2c and 2d
fixed merge conflict
adding check on insert