name change the js snippet to be more clear