changed localsize to NULL (reviewers comment)