move get master id to master class.