added simple argument checking