refactoring to match new language