added basic logic for vertical arrows, and also history struct
added basic logic for vertical arrows, and also history struct
further logic added