added API tests
bugfix