added testing function