finish several functions in align_ibm