optimized pica version for testing.