getting close to having a working api