add speed monitor and fix some bugs