minor refactor on curry()