working on optimizing cutoff