functional dictionary sampling - but needs better testing