finished self collision, code is a mess