Added a naive API
Refacto