refactor out demo class