Moved dff calculation