corrected test, improved API