replaced the first hacking code with the usage of RequestVar for idMemoize