Adding colliding function and other functionalities.