minor changes & 31 instead of % 32