Add intersection code