update to fix previous code
fix the destroy part