Added functionality for add/edit/delete