fixed the function to get the list of buses