better idea of the API
add state enum