Fixed bug that had p_ % 2 instead of q_ % 2
Added license