speed loop working
using speed loop