added override and extra checks for bad parameters