added code to extract riding code