add more tests and implement new interface