added debug output for testing purposes