Added sample filtering