starting out with add function. main should be revised to include IO operations