updated test code