confirmed / fixed api.py