add safe-rm; update js snippet
update js for