removed some logging and lines commented out