test input
new function - find index with min power of vertex