bugfixing simple api and tests