added test code