parsing command line argunents improved