changed plotting, threshold search, throwing away samples only from layer 4 on