found some clean examples of javascript