several improves and used argparse to instead of raw_input