app rewritten in plain jane JS