rewrote trasversal
A major change from the previous version - DEBUGGED
another one?