new interface, added some tests too