replacing env read with getuser function