All working - 24 July version (only sliding window not fixed