[fix] unit tests and implementation based on new interface