finally fixed api