added more robust argument support