updated sampling model to median