adding recursive calls for reverse operation