added save and delete functionality