refactored bike code