refact test