placed root/remount in a function