added breadth function