moved q into require at least for the main example