rearrange functions
fix `root`/`compress` issue