added the shuffle functionality for going backwards Related to #52
minor code reformating