refactor ride structure