new way to solve the stack align problem