removed not used isSampleValid method