replaced stop shell with javascript