two new APIs added, restructured design