where q is some integer