add new function calculateConsistentVertex
add new function calculateConsistentVertex