add examples and links, and use JavaScript