lot of stuff done to custom match