change the  api to a simpler