db calls added for insertion and delete