re-wrote the structure