added testing functionality