restuctured new api