use modifier on generated method