ride and testing code