Refs #14 Added argument windowlength