fixed delete button functionality in script.js
merged changes