finished collision checking in main class