changed import-modules to first loadt lattice and Matrix packages