generalized argument parsing system