1. some minor bug fix for speed calculation, it is unfinished