smarter argument parsing