added in argument checking.