adding argument checking