- add getCategories func

- this func still have issue, need to correct