added categories and fixed some bugs