add time check to set masterID