modified testing code