updated tests and api