work in progress on revised API structure