define can't call params, so moved case inside define.