fixed test
improved API