stripping out session code