added pixel fading and motion detection