mv: moved the qring constant build into a function