Adapt code to find math topic id from standard.