updated for first sample