Added collision detection code and add_function method