added errors flag to api initialization issue #23
modify test