add first draft of trimmer function.
update switch, add if-checks to simplify not sampling.