made seperat collisionDetector.hpp and .cpp