works with php api