added settings speed variable to linear function/replaced += with .push