adjust to use session instead of console hackery