problems with bandwidth selection since beginning to clean up code