initial commit Pat - formatted js slightly