cleaner ast solution