fixed js, typo & example