refactoring available method