Extract dnfs() to separate file