testing bandwidth, cleaned up main