Reintroduced code that was commented out for testing purposes.