bugfix mass collision detection

next step code -> make code more beautifull and delete unused functions