trace direction
check it wrapper overflows
compoensate for overflow per direction
remove console logs and add some comments