complete testing code