progress on refactor for demo