made it work with apis