Added collision detecting template