removed some debug code, added verbose flag