now working as in previous demo, but integrated with angular