wrote command line argument handling in final.c