API and exploring
fix and adapt for demo