improve curry-def