updated main to handle command line args