Version 4

Version 4 of the code.