Updating source file
delete writing functions from main()