implement first border control
fixed some floating points
Merge branch 'Logic'

Implemented border control