changes of structure, implement test API