added editAction, deleteAction, separated save functionality to its own function named "save"