adjusts api adds some tests