cleaning to simplify the structure