cleaned up main. removed some debug statements