added altenative implementation of deep-reverse
solved ex. 2.39