write_bands()