make apply_defaults clearer