update set_at_median() and list_to_matrix() to deal with interactions