cleaned up troubleshooting code