added testing function to see what the hell is going on