Speed function implemented.