new version, changed it around a bit, and fixed the cutoffs (current)