optimized of some instructions of code
the method 'colision' is added.