working using command line input