Created a method for generating speed profiles