number bug in api.py