changed default n to 5 to avoid pickle security error