working on new API
update and cleanup