removed prefix sudo, inserted check is_root function and some other tiny things