added spacedependent external fields