added testing code