some tweaks to complex sample