api and impl fixes - tests