first draft of functional javascript review