A method for a network traffic scheduler to select a winning input node, the network traffic scheduler comprising a logical hierarchy of nodes comprising: a plurality of input nodes; an output node at a top level of the hierarchy; a plurality of intermediate nodes, wherein a subset of the intermediate nodes comprises intermediate nodes being connected to at least one lower level node (27a-i) and one higher level node, the method comprising the steps, for each of the intermediate nodes of the subset, of: selecting a lower level node as a winning node to be forwarded to the higher level node, wherein the selecting is effected by utilizing one or more of a set of input parameters received from at least one lower level node, and the input parameters comprise at least one of an eligibility parameter, a scheduling priority, and a propagated priority, wherein the propagated priority is propagated to the higher level node; obtaining the set of input parameters, the input parameters comprising input data being associated with the winning node; obtaining output parameters by finding a matching row in a lookup table (24, 24a-n) using the input parameters as a key, the lookup table (24, 24a-n) being applicable for all combinations of input parameters and providing a flexible way of defining a function f for output parameters, wherein the lookup table (24, 24a-n) is one of a plurality of predefined lookup tables (24a-n) selected to be active for the respective intermediate node and wherein the selection of function using one of the plurality of predefined lookup tables (24, 241-n) is performed uniformly for all intermediate nodes, separately for each level in the hierarchy or separately for each individual intermediate node; and providing the output parameters, the output parameters comprising at least one of the eligibility parameter, the scheduling priority, and the propagated priority, to the higher level node, wherein the eligibility parameter is calculated by performing an AND operation of an eligibility from the matching row of the lookup table and an input eligibility parameter of the winning node and wherein, when the higher level node is an intermediate node, at least a subset of the output parameters are used as input parameters for the higher level node. selecting a lower level node as a winning node to be forwarded to the higher level node, wherein the selecting is effected by utilizing one or more of a set of input parameters received from at least one lower level node, and the input parameters comprise at least one of an eligibility parameter, a scheduling priority, and a propagated priority, wherein the propagated priority is propagated to the higher level node; obtaining the set of input parameters, the input parameters comprising input data being associated with the winning node; obtaining output parameters by finding a matching row in a lookup table (24, 24a-n) using the input parameters as a key, the lookup table (24, 24a-n) being applicable for all combinations of input parameters and providing a flexible way of defining a function f for output parameters, wherein the lookup table (24, 24a-n) is one of a plurality of predefined lookup tables (24a-n) selected to be active for the respective intermediate node and wherein the selection of function using one of the plurality of predefined lookup tables (24, 241-n) is performed uniformly for all intermediate nodes, separately for each level in the hierarchy or separately for each individual intermediate node; and providing the output parameters, the output parameters comprising at least one of the eligibility parameter, the scheduling priority, and the propagated priority, to the higher level node, wherein the eligibility parameter is calculated by performing an AND operation of an eligibility from the matching row of the lookup table and an input eligibility parameter of the winning node and wherein, when the higher level node is an intermediate node, at least a subset of the output parameters are used as input parameters for the higher level node.