untested implementation of capset