updated useMdRef toggle