added some debug output for testing's sake