first speed calculation added - not working yet