reworking api
complete re-write