added q-expansion computation code and an example