added dnc displacement code