better argument checking