first draft of javascript completed