Fixed the bug when only single argument is passed.
Fixed the program so that the program can take more than once input