work on curry function