shifted static variables to greedy_algo class