better error handling and new action to delete entities