replaced with new sliding window script