made argument parsing smarter