basic JS pinging logic
fixing typo