added 'create sample' functionality