added db add, delete, update logic