Early version of M-SSA. Somehow works...