the is_compatible function looks interesting - could you put a comment in the code saying exactly what it's trying to verify please?