added prime31 support