api rework, more tests