refine test and media