begin to added logic for limiting speed