replace demos with unit test