updated for new sliding window script