fixed test code