restructured angular api