slight modifs - transfer to Fermi