light work, made a whole queue system with sorting and pruning for it problems with indices though