added some more of Paul's new code for testing purposes.