Complete source of program. Version 1.0