Added handling off add and delete