added reverse while loop for easy fast iteration over lists