improve eigensoft code