Integrating Virginia's code (2)