Added functionality for neighbhorhoods and category