migrate test to single function