code organization fix