fixed sideways thought traversing
fixed buggy logic functions