added check for too many arguments