modified test code to work