added sample number analysis