Make defaction a function