implementing currying