simpler interface, also inclues ability to set n and q through terminal