using defsample macro