start diagnal check

start algorithm for diangal check