Added default values for speed and window