added speeds into functions