Version 3

Version 3 of the code.