add js code to splice off or remove old items