added testing codes