made coeffselect() more versatile. Now you can either specify a dimension, or provide precalculated perms