api refactor. added testing env