fixing speed issues