refactored pavement.py