correct limits in perm_test
use shape