moved test code