refactored, added html/json js demo