Added getSamples method.