added query to category repository and added category tree