added speed method

we added a method that defines speed